{% extends "::base.html.twig" %}

{% block title %}Evénements - {{ parent() }}{% endblock %}

{% block stylesheets %}
    {{ parent() }}
    <link rel="stylesheet" href="{{ asset('/bundles/baseevent/css/main.css') }}" type="text/css" media="screen" />
{% endblock %}

{% block title_page %}events{% endblock %}

{% block content %}

<h1 class="title">Liste des événements</h1>

<ul>
 {% for event in event_list %}
  <li>
   <h2>
       <a href="{{ path('_baseEventShow', {"slug": event[0].slug, "year": event[0].updatedAt|date("Y"), "month": event[0].updatedAt|date("m") } ) }}">{{ event[0].title | truncate(35) | raw }}</a>
   </h2>
   <small>Posté le {{ event[0].updatedAt|date("d/m/Y") }} <br/> par {{ event.u_username | truncate(40) | raw }}</small>
  </li>
 {% endfor %}
</ul>

{% endblock %}